<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Flow - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
	<h1 translate="no">Flow</h1>
		<section>
			<header>
				<div class="class-description"><p>A modifier for making meshes bend around curves.</p>
<p>This module can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>. When using <a href="WebGPURenderer.html">WebGPURenderer</a>,
import the class from <code>CurveModifierGPU.js</code>.</p></div>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">Flow</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import { Flow } from 'three/addons/modifiers/CurveModifier.js';</code></pre>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="Flow" translate="no">new <a href="#Flow">Flow</a><span class="signature">( mesh : <span class="param-type"><a href="Mesh.html">Mesh</a></span>, numberOfCurves : <span class="param-type">number</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new Flow instance.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>mesh</strong>
									</td>
									<td class="description last">
										<p>The mesh to clone and modify to bend around the curve.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>numberOfCurves</strong>
									</td>
									<td class="description last">
										<p>The amount of space that should preallocated for additional curves.</p>
										<p>Default is <code>1</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Classes</h2>
				<dl>
					<dt><a href="Flow.html">Flow</a></dt>
					<dd></dd>
				</dl>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="moveAlongCurve" translate="no">.<a href="#moveAlongCurve">moveAlongCurve</a><span class="signature">( amount : <span class="param-type">number</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Moves the mesh along the curve.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>amount</strong>
									</td>
									<td class="description last">
										<p>The offset.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="updateCurve" translate="no">.<a href="#updateCurve">updateCurve</a><span class="signature">( index : <span class="param-type">number</span>, curve : <span class="param-type"><a href="Curve.html">Curve</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Updates the curve for the given curve index.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>index</strong>
									</td>
									<td class="description last">
										<p>The curve index.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>curve</strong>
									</td>
									<td class="description last">
										<p>The curve that should be used to bend the mesh.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/modifiers/CurveModifier.js" translate="no" target="_blank" rel="noopener">examples/jsm/modifiers/CurveModifier.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>